﻿// <auto-generated />
using System;
using IS2.Database.ManagementData;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace IS2.Database.ManagementData.Migrations
{
    [DbContext(typeof(ManagementDataContext))]
    partial class ManagementDataContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.5")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Assignment", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<Guid>("AssignmentId")
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinish")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStart")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<Guid>("ProcedureId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("RoleId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("UserId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Assignments", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Procedure", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinishFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateFinishPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("DateStartFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStartPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<Guid>("ProcedureId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("ProcedureTypeId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("StageId")
                        .HasColumnType("uuid");

                    b.Property<short>("StatusId")
                        .HasColumnType("smallint");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Procedures", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.ProcedureAvailabilityType", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("ProcedureAvailabilityTypeId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("ProcedureAvailabilityTypes", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.ProcedureToModule", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<Guid>("ModuleId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("ProcedureAvailabilityTypeId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("ProcedureId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("ProcedureToModules", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.ProcedureType", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("ProcedureTypeId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("ProcedureTypes", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Project", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinishFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateFinishPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("DateStartFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStartPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("ProjectId")
                        .HasColumnType("uuid");

                    b.Property<short>("StatusId")
                        .HasColumnType("smallint");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Projects", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Role", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("RoleId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Roles", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Session", b =>
                {
                    b.Property<Guid>("SessionId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<Guid>("AssignmentId")
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinish")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStart")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("SessionId");

                    b.ToTable("Sessions", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.SpecificationTemplatePackage", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("SpecificationTemplatePackageId")
                        .HasColumnType("uuid");

                    b.Property<string>("TableName")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("SpecificationTemplatePackages", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.Stage", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinishFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateFinishPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("DateStartFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStartPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<Guid>("StageId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("StageTypeId")
                        .HasColumnType("uuid");

                    b.Property<short>("StatusId")
                        .HasColumnType("smallint");

                    b.Property<Guid>("TaskId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Stages", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.StageType", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("SpecificationTemplatePackageId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("StageTypeId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable(" StageTypes", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.TaskEntity", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime?>("DateFinishFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateFinishPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("DateStartFact")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("DateStartPlan")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("ProjectId")
                        .HasColumnType("uuid");

                    b.Property<short>("StatusId")
                        .HasColumnType("smallint");

                    b.Property<Guid>("TaskId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Tasks", (string)null);
                });

            modelBuilder.Entity("IS2.Database.ManagementData.Model.User", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<DateTime>("DateInsert")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("boolean");

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("MiddleName")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<Guid>("UserId")
                        .HasColumnType("uuid");

                    b.Property<Guid>("VersionId")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("VersionId", "DateInsert", "IsDeleted");

                    b.ToTable("Users", (string)null);
                });
#pragma warning restore 612, 618
        }
    }
}
